class Category < ActiveRecord::Base
  def self.find_category(obj)
    return Category.find_by_name(obj.class.name)||Category.find_by_name(obj.class.superclass.name)
  end
end
